<?php echo View::factory('admin/advert/advert_left')->set('catalog_tree', $catalog_tree)->render(); ?>
<script type="text/javascript" src="/media/js/my_validation.js"></script>
<div id="do_right" class="catalog_right">
    <div class="box" style="overflow:hidden;">
        <h3>添加广告分类</h3>
        <form method="post" action="/admin/advtype/edit/<?php echo $data->chr_advtypeid?>" class="need_validation" enctype="multipart/form-data">
            <div id="tabs">
                <ul>
                    <li><a href="#tabs-1">基本资料</a></li>
                </ul>
                <!--START tabs-1 -->
                <div id="tabs-1">
                    <ul>
                        <li>
                            <label for="chr_parentid" class="lable_title">选择上级分类</label>
                            <select class="drop required" name="chr_parentid" id="chr_parentid">
                                <option value="0">--ROOT--</option>
                                <?php
                                echo $catalog_opt == '' ? '<option value="0">--ROOT--</option>' : $catalog_opt;
                                ?>
                            </select>
                        </li>
                         <li>
                            <label for="chr_advtypefile" class="lable_title">分类图片</label>
                             <input name="chr_advtypefile" id="chr_advtypefile" class="text"  type="file" value=""/>
                             <?php if(!empty($data->chr_advtypefile)):?>
                             <img src="<?php echo URL::base().$data->chr_advtypefile?>" class="photo">  
                             <?php endif?>
                        </li>
                        <li>
                            <label for="chr_advtypename" class="lable_title">分类名称<span class="req">*</span></label>
                            <input name="chr_advtypename" id="chr_advtypename" class="text medium required" type="text" value="<?php echo $data->chr_advtypename?>"/>
                        </li>
                    </ul>
                </div>
                <!--END tabs-1 -->
            </div>
            <ul>
                <li style="text-align: center;">
                    <input value="保存" class="button" type="submit" id="submittype"/>
                </li>
            </ul>
        </form>
    </div>
</div>
